package StudyCode.summary.mycollection;

import java.util.HashSet;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class IfIntersectionBetweenHashSet {
	public static <T> boolean setIntersection(HashSet<T> set1, HashSet<T> set2) {
		for (T elem : set1)
			if (set2.contains(elem))
				return true;
		return false;
	}
}
